package org.jeecg.modules.monitoring.j_monitoring.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.poi.ss.formula.functions.T;
import org.jeecg.modules.monitoring.j_monitoring.entity.MGlComputingResource;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.monitoring.j_monitoring.entity.MGlNetworkResource;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 计算资源(管理)
 * @Author: xiaoyq
 * @Date:   2023-01-08
 * @Version: V1.0
 */
public interface IMGlComputingResourceService extends IService<MGlComputingResource> {

    void testImport(HttpServletRequest request);

    /**
     * 批量创建计算机与群集数据
     */
    boolean batchBindingCluster(String cluster,String clusterId,List<String> idList);

    /**
     * 批量解除群集与计算机的关系
     * @param clusterId
     */
    boolean batchRelieveCluster(String clusterId);

    /**
     * 根据计算机资源Id获得设备地图数据
     * @param id
     * @return
     */
    JSONObject getDeviceMapById(JSONArray nodes, JSONArray edges, int startX, int startY, String id);

    JSONObject getDeviceTreeById(String id);

    @Override
    boolean saveBatch(Collection<MGlComputingResource> entityList, int batchSize);
}
